<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
<f:view>
	<h:head>
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<h:outputStylesheet library="css" name="style.css" />
	</h:head>
	<h:body>
		<h:form id="corps" style="height:100%;width:100%;">

			<h:commandLink action="#{ObjetEleve.retourAcceuil()}"
				title="INGESUP - PARIS EN LIGNE">
				<h:panelGroup styleClass="banniere" layout="block" rendered="true" />
			</h:commandLink>
			<hr />
			<h:panelGroup id="contenu" styleClass="content" layout="block"
				rendered="true">

				<h:panelGroup styleClass="entete" id="entete" layout="block">
					<h:graphicImage id="image" styleClass="photoProfil"
						value="image?id=#{ObjetEleve.photoProfil}" style="float:left;"
						rendered="true">
					</h:graphicImage>
					<h:panelGroup id="name" styleClass="infosEntete" layout="block"
						rendered="true">
						<h:panelGroup id="logout" layout="block">
							<h:commandButton styleClass="deconnect"
								action="#{ObjetEleve.deconnexion()}" />
						</h:panelGroup>
						<h:panelGroup id="nometprenom" layout="block">
							<h:outputText style="font-size: 200%;"
								value="#{ObjetEleve.nom_eleve} #{ObjetEleve.prenom_eleve} #{ObjetEleve.classeEleve.nom_classe}">
							</h:outputText>
						</h:panelGroup>
					</h:panelGroup>
				</h:panelGroup>
				<h:panelGroup id="body" layout="block">
					<h:panelGroup id="menu" styleClass="menu" layout="block"
						rendered="true">
						<rich:collapsiblePanel header="Ajouter une photo !"
							expanded="false" styleClass="menu_item">
							<h:panelGroup id="photo" layout="block">
								<h:panelGroup id="ajouterPhoto" layout="block" rendered="true">
									<p>
										<rich:fileUpload styleClass="fileUpload" listHeight="70px"
											immediateUpload="true"
											fileUploadListener="#{ObjetEleve.listener}"
											value="#{ObjetEleve.photoProfil}"
											uploadData="#{ObjetEleve.photoProfil}"
											acceptedTypes="jpg, png, gif" maxFilesQuantity="1"
											render="image" />
									</p>
									<h:selectBooleanCheckbox value="#{ObjetEleve.asProfil}">Photo de profil</h:selectBooleanCheckbox>
								</h:panelGroup>
							</h:panelGroup>
						</rich:collapsiblePanel>
					</h:panelGroup>
					<h:panelGroup id="wall" styleClass="wall" layout="block">
						<rich:tabPanel switchType="client">
							<rich:tab header="Liste des côtes" style="vertical-align: middle;"
								styleClass="panelItem">
								<h:panelGroup id="panelMonActu">
									<h:panelGroup id="monActu"
										rendered="#{(ObjetEleve.displayModifications) ? false : true}"
										layout="block">
										<b><h:outputText
										value="#{scrapingBean.NewScrap()}" escape="false"/></b>
										<a4j:repeat id="listActu" var="msg"
											value="#{ObjetEleve.listePublications}">
											<p>
												<h:panelGroup styleClass="message" layout="block">z
													<h:outputText value="${msg}" escape="false" />
												</h:panelGroup>
											</p>
										</a4j:repeat>
									</h:panelGroup>
								</h:panelGroup>
							</rich:tab>
							<rich:tab header="Mes messages" style="vertical-align: middle;"
								styleClass="panelItem">
								<h:panelGroup id="panelMsgRecus">
									<h:panelGroup id="messagesRecus"
										rendered="#{(ObjetEleve.displayModifications) ? false : true}"
										layout="block">
										<b> <h:outputText value="MESSAGES RECUS" />
										</b>
										<a4j:repeat id="msgList" var="msg"
											value="#{ObjetEleve.listeMessagesPrives}">
											<p>
												<h:panelGroup styleClass="message" layout="block">
													<a4j:outputPanel layout="block" rendered="true">
														<h:outputText value="${msg}" escape="false" />
													&nbsp;&nbsp;&nbsp;&nbsp;
													<rich:componentControl event="click" target="popup"
															operation="show" />
														<h:graphicImage url="supprimer.jpg" />
														<rich:popupPanel id="popup" modal="true" autosized="true"
															domElementAttachment="form" resizeable="false"
															onmaskclick="#{rich:component('popup')}.hide()">

															<f:facet name="header">
																<h:outputText value="Confirmation suppression message" />
															</f:facet>
															<f:facet name="controls">
																<h:outputLink value="#"
																	onclick="#{rich:component('popup')}.hide(); return false;">
               												 X
           										 		</h:outputLink>
															</f:facet>
															<p>Etes vous sur de vouloir supprimer le message ?</p>
															<h:form>
																<a4j:commandButton styleClass="boutonSupprimer"
																	value=" " action="#{amiBean.delete()}"
																	oncomplete="#{rich:component('popup')}.hide(); return false;"
																	render="listeAmis">
																	<a4j:param value="#{eleveRechercheAmi.id_eleve}"
																		assignTo="#{amiBean.id_eleve_ajout}" />
																	<a4j:param value="#{ObjetEleve.vue.id_eleve}"
																		assignTo="#{amiBean.id_eleve_courant}" />
																</a4j:commandButton>
																<h:commandButton styleClass="boutonAnnuler" value=" "
																	onclick="#{rich:component('popup')}.hide(); return false;" />
															</h:form>
														</rich:popupPanel>
													</a4j:outputPanel>
												</h:panelGroup>
											</p>
										</a4j:repeat>
									</h:panelGroup>
								</h:panelGroup>
							</rich:tab>
							<rich:tab header="L'actualité de ma classe"
								styleClass="panelItem">
								<b><h:outputText
										value="L'ACTU DE LA #{ObjetEleve.classeEleve.nom_classe}" /></b>
							</rich:tab>
							<rich:tab header="Mes informations">
								<h:form>
									<b>MES INFORMATIONS</b>
									<p>
										<a4j:outputPanel id="infosPersos" layout="block">
											<h:panelGrid width="580" columns="2" border="0">
												<h:panelGrid id="panelInscription" columns="2" border="0"
													cellspacing="0" cellpadding="0">
													<a4j:outputPanel>
														<h:outputText value="Nom" />
													</a4j:outputPanel>
													<a4j:outputPanel>
														<h:inputText id="nomInscription"
															value="#{ObjetEleve.nom_eleve}" styleClass="inputbox"
															required="true"
															requiredMessage="Aucun champ ne doit être laissé vide" />
													</a4j:outputPanel>
													<h:outputText value="" />
													<h:outputText value="" />
													<a4j:outputPanel>
														<h:outputText value="Prénom" />
													</a4j:outputPanel>
													<a4j:outputPanel>
														<h:inputText id="pnomInscription"
															value="#{ObjetEleve.prenom_eleve}" styleClass="inputbox"
															required="true"
															requiredMessage="Aucun champ ne doit être laissé vide" />
													</a4j:outputPanel>
													<h:outputText value="" />
													<h:outputText value="" />
													<a4j:outputPanel id="pwd">
														<h:outputText value="Mot de passe" />
														<h:outputText value="*" style="color:#ff0000" />
													</a4j:outputPanel>
													<a4j:outputPanel>
														<h:inputSecret id="passwd" value="#{ObjetEleve.pwd_eleve}"
															redisplay="true" styleClass="inputbox" required="true"
															requiredMessage="Aucun champ ne doit être laissé vide" />
													</a4j:outputPanel>
													<h:outputText value="" />
													<h:outputText value="" />
													<a4j:outputPanel id="classe">
														<h:outputText value="Classe" />
														<h:outputText value="*" style="color:#ff0000" />
													</a4j:outputPanel>
													<a4j:outputPanel>
														<rich:select value="#{ObjetEleve.id_classe_eleve}"
															required="true"
															requiredMessage="Aucun champ ne doit être laissé vide">
															<f:selectItems value="#{classeBean.classes}" var="classe"
																itemValue="#{classe.id_classe}"
																itemLabel="#{classe.nom_classe}" />
														</rich:select>
													</a4j:outputPanel>
													<h:outputText value="" />
													<h:outputText value="" />
													<a4j:outputPanel>
														<h:outputText value="E-Mail" />
														<h:outputText value="*" style="color:#ff0000" />
													</a4j:outputPanel>
													<a4j:outputPanel>
														<h:inputText id="email" size="30"
															value="#{ObjetEleve.email_eleve}" styleClass="inputbox"
															required="true" />
													</a4j:outputPanel>
													<h:outputText value="" />
													<h:outputText value="" />
													<a4j:outputPanel>
														<h:outputText value="Date de naissance" />
														<h:outputText value="*" style="color:#ff0000" />
													</a4j:outputPanel>
													<a4j:outputPanel>
														<rich:calendar value="#{ObjetEleve.date_naissance_eleve}"
															required="true"
															requiredMessage="Aucun champ ne doit être laissé vide" />
													</a4j:outputPanel>
													<h:outputText value="" />
													<h:outputText value="" />
													<h:outputText value="" />
													<h:outputText value="" />
													<a4j:outputPanel>
														<h:outputText value="" />
														<h:outputText value="" />
													</a4j:outputPanel>
													<a4j:outputPanel>
														<h:commandButton styleClass="bouton_MAJ_infos" value=""
															action="#{ObjetEleve.majInfos()}" />
													</a4j:outputPanel>
													<h:outputText value="" />
													<h:outputText value="" />
												</h:panelGrid>
											</h:panelGrid>
										</a4j:outputPanel>
									</p>
								</h:form>
							</rich:tab>
						</rich:tabPanel>
					</h:panelGroup>
				</h:panelGroup>
			</h:panelGroup>
		</h:form>

	</h:body>
</f:view>
</html>
